package com.management.controller;

import com.management.po.User;
import com.management.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/UserController")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/saveUser")
    public int saveUser(User user){
        return userService.saveUser(user);
    }
    @GetMapping("/getUserByIdByPass")
    public User getUserById(String userId,String password){
        return userService.getUserByIdByPass(userId,password);
    }

}
